<script type="text/javascript">
var root = "<?= PATH_URL ?>";
	$(document).ready(function(){
		$('.pagination').on('click', '.ajax_a',function(){
			var page = $(this).data('page');
			$.post(
				root+'news/pagingnews/'+page+'/10',
				'',
				function(response){
					if(response){
						$('#tab-1').html(response.html);
						$('#total_request').html(response.totalRows);
						$('.pagination').html(response.paging);
					}
				},
				'JSON'
				)
		});

	});

</script>
<div class="class_slider">
    <div class="container_c_content">
        <!-- <img src="static/images/content_slider.jpg">-->
        <?php if (!empty($gallery_event)){ ?>
            <ul class="bxslider">
                <?php foreach ($gallery_event as $event) {
                    $link = $event->link;
                    $link = !empty($link) ? $link : "javascript:;";
                    ?>
                    <li><a href="<?= $link ?>" target="_blank"><img
                                src="<?= img(DIR_GALLERY_CATEGORY . $event->image, 445, 225) ?>"/></a></li>
                <?php } ?>
            </ul>
        <?php } else { ?>
        <div class="theme-default" style="height: 238px"
        ;>
        <div class="rank-update" style="color:#f1d5ab;padding: 35px 0px 0px 115px;">Đang cập nhật</div>
    </div>
    <?php } ?>
</div>
</div>
<div class="clearAll"></div>
<div class="class_content left w_100">
    <div class="item_c">
        <h2 class="tit_c">TIN TỨC</h2>

        <div class="clearAll"></div>
        <div class="item_c_content">
            <div id="tab-1">
                <?php if (!empty($items_1)) { ?>
                    <?php
                    $count = count($items_1);
                    $count2 = $count - 1;
                    for ($i = 0; $i <= $count2; $i++) {
                        ?>
                        <div class="hot">
                            <div class="img left">
                                <a href="<?= $items_1[$i]->slug ?>" target="_blank">
                                    <?php if ($items_1[$i]->image != '') { ?>
                                        <?php
                                        if ($items_1[$i]->link_img == 1) {
                                            ?>
                                            <img src="<?= $items_1[$i]->image; ?>" alt="" width="135" height="79"
                                                 class="dblock"/>
                                        <?php } else { ?>
                                            <img
                                                src="<?= resizeImage(PATH_URL . DIR_UPLOAD_NEWS . $items_1[$i]->image, 135); ?>"
                                                alt="" class="dblock"/>
                                        <?php } ?>
                                    <?php } else { ?>
                                        <img src="<?= img(PATH_URL . 'static/images/img/no-image.jpg', 135, 79) ?>"
                                             alt="" class="dblock"/>
                                    <?php } ?>
                                </a>
                            </div>
                            <div class="detail left">
                                <a href="<?= $items_1[$i]->slug ?>" target="_blank">
                                    <h1><?= CutText($items_1[$i]->title, 50) ?></h1></a>
                                <span>Được đăng ngày <?= date("d/m/y", strtotime($items_1[$i]->created)) ?></span>

                                <div class="clearAll"></div>
                                <div class="des">
                                    <?= CutText($items_1[$i]->description, 100) ?>
                                </div>

                            </div>
                        </div>

                        <div class="clearAll"></div>
                        <div style="height: 10px;"></div>
                        <div style=" border-bottom: 1px dotted #3e3832;"></div>
                    <?php } ?>

                <?php } ?>
            </div>
        </div>
    </div>

</div>
<div class="clearAll"></div>
<?= $paging ?>
